//
//  SegmentBarConfig.m
//  SegmentBar_Example
//
//  Created by 王方伟 on 2017/12/4.
//  Copyright © 2017年 acct<blob>=0xE4BAA6616E64E5BF83  447246and457703. All rights reserved.
//

#import "SegmentBarConfig.h"

@implementation SegmentBarConfig

+ (instancetype)defaultConfig {
    SegmentBarConfig *config = [[SegmentBarConfig alloc] init];
    config.segmentBarBackColor = [UIColor clearColor];
    config.itemFont = [UIFont systemFontOfSize:15];
    config.itemNormalColorBlock([UIColor lightGrayColor]);
    config.itemSelectColor = [UIColor redColor];
    
    config.indicatorColor = [UIColor redColor];
    config.indicatorHeight = 2;
    config.indicatorExtraW = 10;
    return config;
}

- (SegmentBarConfig *(^)(UIColor *))itemNormalColorBlock{
    return ^(UIColor *color){
        self.itemNormalColor = color;
        return self;
    };
}

- (SegmentBarConfig *(^)(UIColor *))itemSelectColorBlock{
    return ^(UIColor *color){
        self.itemSelectColor = color;
        return self;
    };
}

- (SegmentBarConfig *(^)(UIColor *))indicatorColorBlock{
    return ^(UIColor *color){
        self.indicatorColor = color;
        return self;
    };
}
@end
